/*
 * @Descripttion: 说明
 * @version: V1.0
 * @Author: GaoWei
 * @Date: 2021-04-29 18:16:39
 * @LastEditors: GW
 * @LastEditTime: 2021-12-20 15:03:24
 */
import { axios } from '../../utils/request'

/**
 * 领料单
 */
const api = {
    save: '/production/pickReturn/save',
    examine: '/production/pickReturn/examine',
    delete: '/production/pickReturn/delete',
    getcode: '/production/pickReturn/getCode',
    choiceDispatch: '/production/work/listUnFinishProductionShowVo',//领料

    choiceWorkReturn: '/production/dispatch/getUnFinishProductionDispatchVoByReturn',//退料
    choiceWorkFillup: '/production/dispatch/getUnFinishProductionDispatchVoByRepair',//补料

    submitUrl: '/production/pickReturn/apply',//领料单提交
}
/**
 * 保存
 */
export function save (data) {
    return axios({
        url: api.save,
        method: "post",
        data: data
    })
}
/**
 * 领料单提交申请
 */
export function submitApi (data) {
    return axios({
        url: api.submitUrl,
        method: "get",
        params: data
    })
}
/**
 * 选加工单(领料)
 */
export function choiceDispatch (data) {
    return axios({
        url: api.choiceDispatch,
        method: "get",
        params: data
    })
}
/**
 * 选加工单(退料)
 */
export function choiceWorkReturn (data) {
    return axios({
        url: api.choiceWorkReturn,
        method: "post",
        data: data
    })
}
/**
 * 选加工单(补料)
 */
export function choiceWorkFillup (data) {
    return axios({
        url: api.choiceWorkFillup,
        method: "post",
        data: data
    })
}

/**
 * 审核
 */
export function examine (data) {
    return axios({
        url: api.examine,
        method: "get",
        params: data
    })
}

/**
 * 删除
 */
export function remove (data) {
    return axios({
        url: api.delete,
        method: "DELETE",
        params: data
    })
}

/**
 * 获取单据编号
 */
export function getCode (data) {
    return axios({
        url: api.getcode,
        method: "get",
        params: data
    })
}

/**
 * 单据提交
 */
export function submitOrder (data) {
    return axios({
        url: '/production/pickReturn/submit',
        method: "get",
        params: data
    })
}
